package com.luck.pf.security.user.logic;

import java.util.List;

import com.luck.org.entity.SysLog;
import com.luck.org.entity.SysUser;
import com.luck.pf.common.entity.UserBean;
import com.luck.pf.framework.logic.IBaseLogic;
import com.luck.pf.security.user.qry.UserQry;
import com.luck.pf.util.Page;

/**
 * 说明:
 * Copyright: Copyright (c) 2010
 * @author zhangwr 2011-8-10 下午02:39:46
 * @version 1.0
 */
public interface IUserLogic extends IBaseLogic {
	public Page findUserPage(UserQry qry) throws Exception;
	/**
	 * 根据用户名查询
	 */
	public SysUser findUserByLoginname(String loginname);
	/**
	 * 检查此用户存不存在
	 * @param user
	 * @return
	 */
	public boolean checkUser(SysUser user);
	/**
	 * 查询出此用户，并组装成bean，放到session中，包括所有业务权限
	 * @param loginname
	 * @return
	 */
	public UserBean findUserBean(String loginname);
	public String saveUser(SysUser user) throws Exception;
	public String deleteUser(SysUser user, UserBean userBean,SysLog log) throws Exception;
	/**
	 * 根据登陆用户来修改用户状态，启用，停用
	 * @param userBean
	 * @param entity
	 * @param userStatus
	 * @return
	 * @throws Exception
	 */
	public String saveUserStatus(UserBean userBean, SysUser entity) throws Exception;
	/**
	 * 查询此机构下所有用户
	 * @param deptId
	 * @return
	 */
	public List<SysUser> findUserByDeptId(Long deptId);
}
